package com.daka.vo.response.passport;

import com.daka.entity.BaseAddress;
import com.daka.entity.UserPassportApplyOrder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * Created by yangx
 * CreateTime: 2016/10/26 11:35
 */

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class PassportResponseCMS {

    private Long id;                //ID
    private String name;            //姓名
    private String sex;             //性别
    private String passportNo;      //公益护照编号
    private int status;             //发放状态
    private Integer applyType;      //申请类型、订单类型 1 首次 2 换发 3 补发
    private String bassAddressName;     //基地名称
    private long bassAddressId;//基地编号
    private String signDate;        //发证日期


//    private String num;             //订单编号
//    private Date createTime;        //申请时间
//    private String applyTypeStr;
//    private Integer applyForm;      //申请方式： 1 在线 2 现场
//    private String applyFormStr;
//    private String cardNo;          //证件号
//    private String mobile;          //手机号


    public static PassportResponseCMS buildVO(UserPassportApplyOrder aa,BaseAddress baseAddress)  {
        PassportResponseCMS res =  new PassportResponseCMS();
        res.setId(aa.getId());
        res.setName(aa.getName());
        res.setSex(aa.getSex());
        res.setPassportNo(aa.getPassportNo());
        res.setStatus(aa.getStatus());
        res.setApplyType(aa.getApplyType());
        res.setBassAddressName(baseAddress.getName());
        res.setBassAddressId(baseAddress.getId());
        res.setSignDate(aa.getSignDate());

        return res;
    }

}

